<?php
/**
 * created by zzy
 * date: 2017/10/20 16:12
 */

namespace App\Eloquent\Ygt;

class UserFriend extends DbEloquent{

    public static $orderby_id     = true;
    protected $table    = 'ygt_user_friend';

    // 对用户的好友列表 进行对应的分组
    public static function getGroupFriendListByUserId( $userId ){

        $where              = ['from_user_id'=>$userId];
        $lists              = self::getList( $where );
        $result             = $lists->groupBy( 'group_id' );
        return $result;
    }
}